package com.svms.save;

import java.nio.charset.StandardCharsets;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@ComponentScan(basePackages = "com.svms")
@MapperScan(basePackages = {"com.svms.save.**.mapper"})
@SuppressWarnings({ "rawtypes", "unchecked" })
@EnableTransactionManagement
public class SvmsSaveApplication {
	
	@Bean
	public RestTemplate restTemplate() {
		RestTemplate restTemplate=new RestTemplate();
		restTemplate.getMessageConverters().set(1,new StringHttpMessageConverter(StandardCharsets.UTF_8));
        return  restTemplate;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		SpringApplication.run(SvmsSaveApplication.class, args);
	}
}
